package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 菜品及套餐分类 Mapper 接口
 * </p>
 *
 * @author xiaoduan
 * @since 2024-07-09
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    @Select("select * from category where name = #{name} ;")
    Category findByName(String name);

    @Select("select * from category where type = #{type} ;")
    List<Category> findListByType(String type);

}
